#include "ItemEffectivePhysics.h"




void ItemEffectivePhysics::update()
{
	_data->type = _data->getItemType();
	double x = _data->getRect()->X;
	if (isFirst) {
		tempX = x + _data->getDirection() * 60;
		isFirst = false;
		_data->counter = sqrt(abs(_data->rect->Y - _data->getBaseY() - 70));
	} else {
		_data->rect->X += 3 * _data->getDirection();
		_data->rect->Y =  _data->getDirection() * ((_data->counter * _data->counter)) + (_data->getBaseY() + 70);
		_data->counter += _data->getDirection() * 0.4;
	}
}

ItemEffectivePhysics::ItemEffectivePhysics(ItemData* data) : ItemPhysics(data)
{
	isFirst = true;
}
